package com.dahua.simplefactory.version3;

import java.util.Scanner;

/**
 * @author sunhongguang
 * @create 2022-01-09-11:39
 */
public class Client {

    public static void main(String[] args) {
        {
            try {
                Scanner scanner = new Scanner(System.in);
                System.out.println("请输入数字A： ");
                double numberA = scanner.nextDouble();
                System.out.println("请选择运算符号（+、-、*、/）: ");
                String operate = scanner.next();
                System.out.println("请输入数字B： ");
                double numberB = scanner.nextDouble();
                System.out.println("结果是："+ Calculate.GetResult(numberA, numberB, operate));
            } catch (Exception e) {
                System.out.println(e);
            }
        }
    }
}
